//
//  ViewController.m
//  XiangMu
//
//  夏翠萍
//  Created by GERRY－PC on 16/5/5.
//  Copyright © 2016年 GERRY－PC. All rights reserved.
//

#import "ViewController.h"
#import "MyViews.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet MyViews *drawingBoard;//画板
@property (weak, nonatomic) IBOutlet UIView *colorPalette;//调色板

@property (weak, nonatomic) IBOutlet UISlider *colorRed;//红色条
@property (weak, nonatomic) IBOutlet UISlider *colorGreen;//绿色
@property (weak, nonatomic) IBOutlet UISlider *colorBlue;//蓝色


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}
- (IBAction)changLinrType:(UISegmentedControl *)sender {
    _drawingBoard.storkeType = sender.selectedSegmentIndex;
}
//调色板颜色变化
- (IBAction)colorPalettes:(UISlider *)sender {
    _colorPalette.backgroundColor=[UIColor colorWithRed:_colorRed.value green:_colorGreen.value blue:_colorBlue.value alpha:1];
    _drawingBoard.storkeColor = _colorPalette.backgroundColor;
}
//字体大小设置
- (IBAction)fontSize:(UISlider *)sender {
    _drawingBoard.storkeWidth =[sender value];
}

//清空画板
- (IBAction)emptyDrawBorad:(UIButton *)sender {
    [_drawingBoard qingKong];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
